package com.ruoyi.event.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.annotation.UserMemberInfo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 签到视图对象 event_qd
 *
 * @author strongme
 * @date 2023-02-04
 */
@Data
@ExcelIgnoreUnannotated
public class EventQdVo implements EventInfo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long qdId;

    /**
     * 吸毒人员id
     */
    @ExcelProperty(value = "吸毒人员id")
    private Long userId;

    @UserDrugInfo
    public Object getUserInfo() {
        return userId;
    }

    @UserDrugInfo(onlyName = false)
    public Object getUserInfoDetail() {
        return userId;
    }

    /**
     * 工作人员id
     */
    @ExcelProperty(value = "工作人员id")
    private Long memberId;

    @UserMemberInfo
    public Object getMemberInfo() {
        return memberId;
    }

    /**
     * 签到地址
     */
    @ExcelProperty(value = "签到地址")
    private String qddz;

    /**
     * 图片
     */
    @ExcelProperty(value = "图片")
    private String img;

    /**
     * 视频
     */
    @ExcelProperty(value = "视频")
    private String sp;

    /**
     * 经度
     */
    @ExcelProperty(value = "经度")
    private BigDecimal lng;

    /**
     * 纬度
     */
    @ExcelProperty(value = "纬度")
    private BigDecimal lat;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    private Date createTime;

    private Date updateTime;


    @Override
    public Long getId() {
        return qdId;
    }

    @Override
    public String getText() {
        return qddz;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getTime() {
        return createTime;
    }
}
